<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
		<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
        <link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
        <link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
        <script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
        <script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
        <link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet">
        <script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
        <script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
        <title>后台管理</title>
    </head>

    <body class="body_ifm">
        <div id="status_div" style="display:none; width: 350px; ">
            <div class="" style=" margin-top:10px; ">
                <form class="layui-form" action="index.php?m=admin_userchange&c=status" target="supportiframe" method="post" id="lockform">
                    <table cellspacing='1' cellpadding='1' class="admin_examine_table">
                         <tr>
                            <th>当前类型：</th>
                            <td align="left"><div id="presusertype"></div></td>
                        </tr>
                           <tr>
                            <th>申请类型：</th>
                            <td align="left"><div id="applyusertype"></div></td>
                        </tr>
                        <tr>
                            <th>申请说明：</th>
                            <td align="left"><textarea id="applybody" name="applybody" class="admin_explain_textarea"></textarea> </td>
                        </tr>
                        <tr>
                            <th width="80">审核操作：</th>
                            <td align="left">
                                <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <div class="admin_examine_right">
                                            <input name="status" id="status1" value="1" title="同意" type="radio" />
                                            <input name="status" id="status2" value="2" title="拒绝" type="radio" />
                                        </div>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <th>审核说明：</th>
                            <td align="left"> <textarea id="statusbody" name="statusbody" class="admin_explain_textarea"></textarea> </td>
                        </tr>
                        <tr>
                            <td colspan='2' align="center"><input type="button" value='确认' onClick="lockform();" class="admin_examine_bth">
                                <input type="button" id="zxxCancelBtn" onClick="layer.closeAll();" class="admin_examine_bth_qx" value='取消'></td>
                        </tr>
                    </table>
                        <input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
                        <input name="uid" value="0" type="hidden">
                        <input name="moblie" value="0" type="hidden">
                        <input name="id" value="0" type="hidden">
                </form>
            </div>
        </div>      
        <div class="infoboxp">
        
            <div class="admin_new_tip">
                <a href="javascript:;" class="admin_new_tip_close"></a>
                <a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
                <div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
                <div class="admin_new_tip_list_cont">
                    <div class="admin_new_tip_list">该页面展示了网站所有的会员申请切换信息。可以进行审核操作</div>
                    <div class="admin_new_tip_list">可输入名称关键字进行搜索，也可进行详细的高级搜索。</div>
                </div>
            </div>
            <div class="clear"></div>
            <div class="admin_new_search_box">
                <form action="index.php" name="myform" method="get">
                    <input name="m" value="admin_userchange" type="hidden" />
                    <div class="admin_new_search_name">搜索类型：</div>
                    <div class="admin_Filter_text formselect" did='dkeytype'>
                        <input type="button" {yun:}if $smarty.get.keytype=='' ||$smarty.get.keytype=='1' {/yun} value="用户名" {yun:}elseif $smarty.get.keytype=='2' {/yun} value="用户ID" {yun:}/if{/yun} class="admin_Filter_but" id="bkeytype">

                        <input type="hidden" name="type" id="keytype" {yun:}if $smarty.get.keytype=='' ||$smarty.get.keytype=='1' {/yun} value="1" {yun:}elseif $smarty.get.keytype=='3' {/yun} value="3" {yun:}/if{/yun}/>
                        <div class="admin_Filter_text_box" style="display:none" id="dkeytype">
                            <ul>
                                <li>
                                    <a href="javascript:void(0)" onClick="formselect('1','keytype','用户名')">用户名</a>
                                </li>
                                <li>
                                    <a href="javascript:void(0)" onClick="formselect('2','keytype','用户ID')">用户ID</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <input type="text" value="" placeholder="请输入你要搜索的关键字" name='keyword' class="admin_new_text">
                    <input type="submit" value="搜索" name='search' class="admin_new_bth">
                    <a href="javascript:void(0)" onclick="$('.admin_screenlist_box').toggle();" class="admin_new_search_gj">高级搜索</a>
                </form>
                
              {yun:}include file="siteadmin/admin_search.htm"{/yun} 
            </div>
            
            <div class="clear"></div>
            <div class="admin_statistics">
                  数据统计：
              <em class="admin_statistics_s">总数：<span class="ajaxall">0</span></em>
              <em class="admin_statistics_s">待确认：<span class="StatusNum3">0</span></em>
              搜索结果：<span>{yun:}$total{/yun}</span>；
            </div>
            <div class="clear"></div>

            <div class="table-list">
                <div class="admin_table_border">
                    <iframe id="supportiframe" name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
                    <form action="index.php?m=admin_userchange&c=del" target="supportiframe" name="myform" method="post" id='myform'>
                      <input type="hidden" name="pytoken" id='pytoken' value="{yun:}$pytoken{/yun}">
                        <table width="100%">
                            <thead>
                                <tr class="admin_table_top">
                                    <th style="width:20px;">
                                      <label for="chkall"><input type="checkbox" id='chkAll'  onclick='CheckAll(this.form)' /></label>
                                    </th>
                                    <th align="left"> 
                                      {yun:}if $smarty.get.t=="uid" && $smarty.get.order=="asc"{/yun}
                                        <a href="index.php?m=admin_userchange&order=desc&t=uid">用户UID<img src="images/sanj.jpg" /></a>
                                      {yun:}else{/yun}
                                        <a href="index.php?m=admin_userchange&order=asc&t=uid">用户UID<img src="images/sanj2.jpg" /></a> 
                                      {yun:}/if{/yun}
                                    </th>
                                    <th align="left">用户名</th>
                                    <th align="left">联系电话</th> 
                                     <th align="left">申请方式</th>
                                     <th align="left">当前类型</th>
                                    <th align="left">申请类型</th>
                                    <th align="left">申请时间</th>
                                    <th>状态</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                {yun:}foreach item=v key=key from=$rows{/yun}
                                <tr {yun:}if ($key+1)%2=='0' {/yun}class="admin_com_td_bg" {yun:}/if{/yun} id="list{yun:}$v.uid{/yun}">
                                    <td width="20"><input type="checkbox" value="{yun:}$v.id{/yun}" class="check_all" name='del[]' onclick='unselectall()' rel="del_chk" /></td>
                                    <td align="left" class="td1" style="width:60px;">
                                        {yun:}$v.uid{/yun}
                                    </td>
                                    <td align="left">
                                      {yun:}$v.name{/yun}

                                    </td>
                                          <td align="left">
                                        <div>
                                           <span class="admin_new_sj">{yun:}$v.moblie{/yun}</span> 
                                        </div>
                                    </td>
                                    <td align="left">{yun:}if $v.type==1{/yun}用户申请{yun:}else{/yun}管理员转换{yun:}/if{/yun}</td>
                                    <td align="left">{yun:}$v.pres_usertype{/yun}</td>
                                    <td align="left">{yun:}$v.apply_usertype{/yun}</td>
                                  	<td align="left">
                                        {yun:}$v.apply_time|date_format:"%Y-%m-%d"{/yun}
                                    </td>
                                    <td align="center">{yun:}if $v.status=='1'{/yun}<span class="admin_com_Audited">已确认</span>{yun:}else if $v.status=='2'{/yun}<span class="admin_com_tg">已拒绝</span>{yun:}else{/yun}<span class="admin_com_noAudited">待确认</span>{yun:}/if{/yun}
                                    </td>
                                     
                                    <td align="center">
                                        {yun:}if $v.status!=1{/yun}
                                        <a href="javascript:;" class="admin_new_c_bth admin_new_c_bthsh status" pid="{yun:}$v.uid{/yun}" presusertype="{yun:}$v.pres_usertype{/yun}" moblie="{yun:}$v.moblie{/yun}" applyusertype="{yun:}$v.apply_usertype{/yun}" id="{yun:}$v.id{/yun}" applybody="{yun:}$v.applybody{/yun}" status="{yun:}$v.status{/yun}">审核</a>
                                        {yun:}/if{/yun}
                                        <a href="javascript:void(0)" onClick="layer_del('确定要删除？', 'index.php?m=admin_userchange&c=del&del={yun:}$v.id{/yun}');" class="admin_new_c_bth admin_new_c_bth_sc">删除</a>
                                    </td>
                                </tr>
                                {yun:}/foreach{/yun}
                                <tr>
                                <td align="center"><label for="chkall2"><input type="checkbox" id='chkAll2' onclick='CheckAll2(this.form)' /></label></td>
                                    <td colspan="12"><label for="chkAll2">全选</label> &nbsp;
                                        <input class="admin_button" type="button" name="delsub" value="删除所选" onclick="return really('del[]')" />
                                    </td>
                                  </tr>	
                                  {yun:}if $total > $config.sy_listnum {/yun}
                                    <tr>
                                      {yun:}if $pagenum==1{/yun}
                                        <td colspan="3"> 从 1 到 {yun:}$config.sy_listnum {/yun} ，总共 {yun:}$total{/yun} 条</td>
                                      {yun:}else if $pagenum > 1 && $pagenum < $pages{/yun}
                                        <td colspan="3"> 从 {yun:}($pagenum-1) * $config.sy_listnum + 1{/yun} 到 {yun:}$pagenum * $config.sy_listnum{/yun} ，总共 {yun:}$total{/yun} 条</td>
                                      {yun:}else if $pagenum == $pages{/yun}
                                        <td colspan="3"> 从 {yun:}($pagenum-1) * $config.sy_listnum + 1{/yun} 到 {yun:}$total{/yun} ，总共 {yun:}$total{/yun} 条</td>
                                      {yun:}/if{/yun}
                                      <td colspan="10" class="digg">{yun:}$pagenav{/yun}</td>
                                    </tr>
                                  {yun:}/if{/yun}
                            </tbody>
                        </table>
                        
                    </form>
                </div>
            </div>
        </div>
        <script type="text/javascript">
            layui.use(['layer', 'form'], function() {
                var layer = layui.layer,
                    form = layui.form,
                    $ = layui.$;    
            });
            
            $(document).ready(function(){
				$(".job_name_all").hover(function(){
					var pid=$(this).attr('v');
					if($.trim(pid)!=''){
						layer.tips(pid, this, {guide: 1, style: ['background-color:#5EA7DC; color:#fff;top:-7px', '#5EA7DC']}); 
						$(".xubox_layer").addClass("xubox_tips_border");
					} 
				},function(){
					layer.closeAll('tips');
				});
				$.get("index.php?m=admin_userchange&c=memNum", function(data) {
					var datas = eval('(' + data + ')');
					if(datas.memAllNum) {
					  $('.ajaxall').html(datas.memAllNum);
					}
					if(datas.memStatusNum3) {
					  $('.StatusNum3').html(datas.memStatusNum3);
					}
				});
                $(".status").click(function() {
                    
                    $("#presusertype").html($(this).attr("presusertype"));
                    $("#applyusertype").html($(this).attr("applyusertype"));
                    $("input[name=pid]").val($(this).attr("pid"));
                    $("input[name=moblie]").val($(this).attr("moblie"));
                    $("input[name=id]").val($(this).attr("id"));
                    $("#applybody").val($(this).attr("applybody"));
                    var uid = $(this).attr("pid");
                    var status = $(this).attr("status");
                    $("#status" + status).attr("checked", true);
                    layui.use(['form'], function() {
                        var form = layui.form;
                        form.render();
                    });
                    $("input[name=uid]").val(uid);
                    $.get("index.php?m=admin_userchange&c=lockinfo&uid=" + uid, function(msg) {
                        $("#statusbody").val($.trim(msg));
                        status_div('申请转换身份操作', '450', '360');
                    });
                });
              });
              function lockform(){
                var status =$("input[name=status]:checked").val();
                if(status=="" && status=='undefined'){
                  parent.layer.msg('请选择审核操作！', 2, 8);return false;
                }else if(status==2){
                  var statusbody=$.trim($("textarea[name='statusbody']").val());
                  if(statusbody==""){
                      parent.layer.msg('请填写审核说明！', 2, 8);return false;
                  }
                }
                loadlayer();
                $('#lockform').submit()
              }
        </script>
    </body>

</html>